<html>

	<head>
		<meta charset="UTF-8">
		<title>EdgexFoundry后台管理系统</title>
		<link href="https://cdn.bootcss.com/bootstrap/3.3.5/css/bootstrap.min.css" rel="stylesheet">
		<link href="/statics/css/style.css" rel="stylesheet" >
		
	</head>

<body>

<div id="wrapper" class="toggled" >

    <!-- 边栏sidebar -->
    <nav class="navbar navbar-inverse navbar-fixed-top" id="sidebar-wrapper" role="navigation">
        <ul class="nav sidebar-nav">
            <li class="sidebar-brand">
                <a href="#">后台管理</a>
            </li>
            <li>
                <a href="/articles/0/10"><i class="fa fa-fw fa-list-alt"></i> 文章管理</a>
            </li>

            <li>
                <a href="/sell/seller/order/list"><i class="fa fa-fw fa-list-alt"></i> 用户管理</a>
            </li>

            <li class="dropdown open">
                <a href="#" class="dropdown-toggle" data-toggle="dropdown" aria-expanded="true">
                    <i class="fa fa-fw fa-plus"></i> 类目管理 <span class="caret"></span>
                </a>
                <ul class="dropdown-menu" role="menu">
                    <li class="dropdown-header">&nbsp;&nbsp;&nbsp;操作</li>
                    <li><a href="/sell/seller/category/list">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;列表</a></li>
                    <li><a href="/sell/seller/category/index">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;新增</a></li>
                </ul>
            </li>

            <li>
                <a href="/user/logout/{{.UserName}}"><i class="fa fa-fw fa-list-alt"></i> 注销</a>
            </li>
        </ul>
    </nav>
	
    <!-- 主要内容 -->
    <div id="page-content-wrapper" >
		
		<div class="container-fluid" style="background-color: #B1687C;">
			<div class="row-fluid">
				<div class="span12" align="right">
					 <p><span style="font-weight: bold;">管理员:{{.UserName}}&nbsp;&nbsp;&nbsp;</span></p>
				</div>
			</div>
		</div>
		
		<div class="container-fluid" >
            <div class="row clearfix">
                <div class="col-md-12 column">
                    <table class="table table-condensed table-hover table-bordered">
                        <thead>
                            <tr class="info">
																<th>序号</th>
                                <th>标题</th>
                                <th>类目</th>
                                <th>作者</th>
                                <th>头像</th>

                                <th>审核状态</th>
                                <th>阅读数</th>
                                <th>创建时间</th>
                                <th colspan="3">操作</th>
                            </tr>
                        </thead>

                        <tbody>
													{{range $i, $v := .Articles}}
													{{ if or (eq $i 0) (eq $i 2) (eq $i 4) (eq $i 6) (eq $i 8) }}
													<tr class="success">
													{{ else}}
													<tr class="warning">
													{{ end }}
													
														<td>{{ $i }}</td>
														<td><a href="/article/getArticle/{{.Id.Hex}}">{{.Title}}</a></td>
														<td>{{.Type}}</td>
														<td>{{.UserName}}</td>
														<td><img height="50" width="50" src="{{.AvatarUrl}}"/></td>
														{{ if .Approved }}
														<td><font color="blue">已通过</font></td>
														{{ else }}
														<td><font color="red">未通过</font></td>
														{{ end }}

														<td>{{.ReadCount}}</td>
														<td>{{.CreatedStr}}</td>
														<td><a href="/article/passArticle/{{.Id.Hex}}">通过</a></td>
														<td><a href="/article/rejectArticle/{{.Id.Hex}}">驳回</a></td>
														<td>
															<a title="编辑"  href ="javascript:return false;" onclick="return false;" style="cursor: default;"><i class="edit" style="opacity: 0.5">删除</i></a>
														</td>
													</tr>
													{{end}}
                        </tbody>
                    </table>
                </div> 
			


                <!-- 分页 -->
                <div class="col-md-12 column">
                    <ul class="pagination pull-right">
											<li><a href="#" class="disabled">上一页</a></li>
											<li><a href="/articles/0/10">1</a></li>
											<li><a href="/articles/10/20">2</a></li>
											<li><a href="/articles/20/30">3</a></li>
											<li><a href="#" class="disabled">下一页</a></li>
                    </ul>
                </div>
			

		    </div>

        </div>
    </div>

</div>



</body>
</html>